package util;

public class Util {
	public static native void diga ();
	
	public static native int binomial(double m, int n);
	
	public static native int[] multinomial(int size, int k, double[] p, int[] n);
	
	static {
//		System.loadLibrary("estatistica");
	}
	
	public static long fatorial(int num){
		long resp = 1L;
		int i = 2;
		while(i <= num){
			resp *= i;
			i++;
		}
		return resp;
	}

	public static double poisson(double z, double x){
		return ((Math.exp(-z)*Math.pow(z,x))/fatorial((int)x));
	}
}
